/**
 * permission api
 */
import $http from '../../http/http'

/**
 * 分页获取权限列表
 */
export const queryPermissionsPage = (pageNo, pageSize) => {
    return $http.get("permissionOperations/queryPermissionsPage", {
        params: {
            pageNo: pageNo,
            pageSize: pageSize
        }
    });
}

/**
 * 获取权限列表
 */
export const queryPermissions = () => {
    return $http.get("permissionOperations/queryPermissions", {
        params: {
        }
    });
}

/**
 * 新增permission
 * @param {新增permisson请求数据} data 
 */
export const addPermission = data => {
    return $http.post("permissionOperations/newPermission", data);
}

/**
 * 删除permission
 * @param {删除permisson请求数据} data 
 */
export const deletePermission = data => {
    return $http.post("permissionOperations/deletePermission", data);
}